//
//  SQLiteFs.h
//  FuseSQLite
//
//  Created by Admin on 7/14/14.
//  Copyright (c) 2014 Admin. All rights reserved.
//

#ifndef SQLITE_FS_H_
#define SQLITE_FS_H_

#include <sys/stat.h> //mode_t

#include <osxfuse/fuse.h>

#include "SQLiteFsRepository.h"

class SQLiteFs
{
public:
    SQLiteFs(const char* dbPath);
    
    int getAttributes(const char *path, struct stat* stbuf);
    
    int createDirectory(const char* path, mode_t mode);
    int removeDirectory(const char* path);
    int readDirectory(const char *path, void *buf, fuse_fill_dir_t filler,
                      off_t offset, struct fuse_file_info *fi);
    
    int rename(const char* path, const char* newPath);

private:
    SQLiteFsRepository m_sqliteFsRepo;
};

#endif //SQLITE_FS_H_
